#include "ZigbusType.h"

ZigbusType::ZigbusType()
    : ZigbusItem(-1, TYPE_SIZE)
{
}

ZigbusType::ZigbusType(int value)
    : ZigbusItem(value, TYPE_SIZE)
{
}


ZigbusType::ZigbusType(const ZigbusType &other)
    : ZigbusItem(other)
{
}

QString ZigbusType::text() const
{
    switch(getValue())
    {
    case TYPE_UNDEFINED: return "undefined";
    case TYPE_NUMERIC_OUTPUT: return "numeric_output";
    case TYPE_NUMERIC_INPUT: return "numeric_input";
    case TYPE_PWM_OUTPUT: return "pwm";
    case TYPE_ANALOGIC_INPUT: return "analogic_input";
    case TYPE_LIGHT: return "light";
    case TYPE_HEATER: return "heater";
    case TYPE_METEO: return "meteo";
    case TYPE_SERVO: return "servo";
    case TYPE_TOKEN: return "token";
    case TYPE_REMOTE: return "remote";
    case TYPE_SERIAL: return "serial";
    default:
        return ZigbusItem::text();
    }
}
